<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link crossorigin="anonymous" integrity="sha512-6KY5s6UI5J7SVYuZB4S/CZMyPylqyyNZco376NM2Z8Sb8OxEdp02e1jkKk/wZxIEmjQ6DRCEBhni+gpr9c4tvA==" href="https://lib.baomitu.com/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <title>球星列表</title>
    <script crossorigin="anonymous" integrity="sha512-b3xr4frvDIeyC3gqR1/iOi6T+m3pLlQyXNuvn5FiRrrKiMUJK3du2QqZbCywH6JxS5EOfW0DY0M6WwdXFbCBLQ==" src="https://lib.baomitu.com/Chart.js/3.5.1/chart.js"></script>
</head>
<style>
    body{
        background-image: url("../img/00.jpg");
        background-repeat: no-repeat;
        background-size: 100% auto;
    }
    .wenzi3{
        color: white;
        text-align: center;
    }
    .ziti{
        color: #ededed;
        font-size: 20px;
    }
    .ziti1{
        color: #337ab7;
    }
</style>
<!--<head th:replace="layouts::header"></head>-->

<body>

<!--<nav th:replace="layouts::navbar"></nav>-->
<div class="container">

    <h3 class="ziti1">球星列表</h3>
<!--  新增球星按钮-->
    <a th:href="@{/ballstars/new}" class="btn btn-primary btn-sm nb-3">新增球星</a>
    <a th:href="@{/}" class="btn btn-primary btn-sm nb-3">返回主页</a>
<br>
<table class="table table-bordered table-striped">
    <thead class="thead-dark">
    <tr>
        <th class="wenzi3">球星姓名</th>
        <th class="wenzi3">年龄</th>
        <th class="wenzi3">身高</th>
        <th class="wenzi3">司职</th>
        <th class="wenzi3">所属球队</th>
        <th class="wenzi3">动作</th>
    </tr>
    </thead>v
<tbody>
    <tr th:each="aBallstar : ${ballstars}">
        <td th:text="${aBallstar.name}" class="ziti"></td>
        <td th:text="${aBallstar.age}" class="ziti"></td>
        <td th:text="${aBallstar.height}" class="ziti"></td>
        <td th:text="${aBallstar.division}" class="ziti"></td>
        <td th:text="${aBallstar.team}" class="ziti"></td>
        <td>
            <a th:href="@{/ballstars/update(id=${aBallstar.ballstarId})}" class="btn btn-info btn-sn">修改</a>
            <a th:href="@{/ballstars/delete(id=${aBallstar.ballstarId})}"
               class="btn btn-danger btn-sn"
               onclick="if (!(confirm('你确定删除这个球星吗')))return false"
            >删除</a>
        </td>
    </tr>

    </tbody>
</table>
</div>
</body>
</html>